def fibonacci():
    i = 1
    j = 1
    while True:
        yield i
        i, j = j, i + j

c = 0
max = 0
for i in fibonacci():
    l = len(str(i))
    if l > max:
        print '\r%d' % l,
        max = l
    c += 1
    if max >= 1000:
        print i, c
        break
        